const Router = require('koa-router')
const complainRouter = new Router({prefix:'/complains'})

const { verifyAuth } = require('../middleware/authMiddleware')
const {
  createComplain,
  getComplainList,
  resolveComplain,
  removeComplain
} = require('../controller/complainController')

//提出申诉
complainRouter.post('/',verifyAuth,createComplain)
//查看所有申诉
complainRouter.post('/list', verifyAuth, getComplainList)
//删除
complainRouter.delete('/:id', verifyAuth, removeComplain)
//处理申诉
complainRouter.patch('/:id', verifyAuth, resolveComplain)

module.exports = complainRouter